﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using ChinaGS.Lian.ModuleRemoting;

public partial class recharge_area_confirm_netcom : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        SysCommon.checkUserLogin();

        if (!IsPostBack)
        {
            String cusNo = this.Request["netcom_num"];
            NetComPackage ncp = RemotingClass.netComBillCheck(cusNo);

            //测试使用
           /*NetComPackage ncp = new NetComPackage();
            ncp.Status = true;
            ncp.StatusNo = "00";
            ncp.Message = "success";
            ncp.Charge = 0;
            ncp.CusName = "denveryee";
            ncp.ItemNo = "123456789";
            ncp.PayDate = DateTime.Now.ToString("yyyy年MM月dd日");
            ncp.RealPay = 0;
            ncp.ReceiPay = 100;*/

            if (ncp.Status)
            {
                if (!ncp.StatusNo.Equals("00"))
                {
                    //测试使用
                    this.LabMessage.Text = ncp.Message;
                    //调整内容正式时使用
                    //this.LabMessage.Text = RemotingClass.showErrorMessage(ncp.StatusNo);                        
                    PanBill.Visible = false;
                }
                else
                {
                    this.LabMessage.Text = "尊敬的" + ncp.CusName + "，您的账单信息如下：";                   
                    //显示查询结果     
                    LabCusName.Text = ncp.CusName;
                    LabCusNo.Text = ncp.CusNo;
                    this.LabChargeName.Text = "本期账单";
                    this.LabCharge.Text = ncp.ReceiPay.ToString();

                    HidReceiPay.Value = ncp.ReceiPay.ToString();
                    HidAcctId.Value = ncp.ItemNo;
                    HidcusNo.Value = cusNo;
                    HidCharge.Value = ncp.Charge.ToString();

                    PanBill.Visible = true;
                }
            }
            else
            {
                this.LabMessage.Text = "本次操作失败，错误信息是：" + ncp.Message + "请稍后重试！";
                //显示查询失败
                PanBill.Visible = false;
            }

        }        
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        Response.Redirect("fill_netcom.aspx?HidReceiPay=" + HidReceiPay.Value.ToString()
                                    + "&HidCharge=" + HidCharge.Value                       
                                    + "&HidAcctId=" + HidAcctId.Value
                                   + "&HidcusNo=" + HidcusNo.Value);
    }
}
